# -*- coding: utf-8 -*-
# @Time    : 2021/10/30 13:20
# @Author  : stephen
# @File    : urls.py

from django.urls import path
from rest_framework.routers import SimpleRouter
from rest_framework_jwt.views import obtain_jwt_token
from student.views import StudentViewSet, ClassesViewSet, ImageVerifyView, ClassesMemberViewSet
from rest_framework.documentation import include_docs_urls

router = SimpleRouter()
router.register('api/students', StudentViewSet)
router.register('api/classes', ClassesViewSet)
urlpatterns = [
    path('docs/',include_docs_urls(title='接口文档')),
    path('login/', obtain_jwt_token),
    path('image/verification/<uuid>/', ImageVerifyView.as_view()),
    path('classes/<pk>/students/',ClassesMemberViewSet.as_view({'post':'add_member'}))
]
urlpatterns += router.urls
